package router

import (
	Admin "gin_webframework/09urlgroup/admin"
	Order "gin_webframework/09urlgroup/order"
	User "gin_webframework/09urlgroup/user"
	"github.com/gin-gonic/gin"
)

func Router(router *gin.Engine) {
	v1 := router.Group("/api/v1")
	v2 := router.Group("/api/v2")

	{
		user := v1.Group("/user")
		admin := v1.Group("/admin")
		order := v1.Group("/order")
		Admin.Router(admin)
		User.Router(user)
		Order.Router(order)
	}
	{
		user := v2.Group("/user")
		admin := v2.Group("/admin")
		order := v2.Group("/order")
		Admin.Router(admin)
		User.Router(user)
		Order.Router(order)
	}

}
